Tags

, , , ,


The Good Data Bible: Set Theory

Santiago de Compostela, Galicia, 7th November 2025

Set theory is a branch of mathematics that studies sets, which are simply collections of things.

It was pioneered by Georg Cantor, a German mathematician, in the late 19th century. He introduced concepts such as infinite sets (sets that contain an endless number of elements) and cardinality (a concept that helps define the number of elements in a set). His work, initially controversial, revolutionised mathematics by providing a rigorous framework for understanding infinity despite facing personal and professional challenges.

Set theory, at its core, is the elegant science of clustering: a set of abstract tools for collecting objects and mapping the intricate web of relationships between them. What begins as a seemingly simple concept (simply arranging things) quickly reveals itself to be the hidden architecture behind modern mathematics, logic, computing, and even our digital lives.

It’s the discrete framework that shapes how we define, connect, and calculate everything from numbers to neural networks.

Knowing set theory is very useful. Most database management systems incorporate concepts of set theory into their design.

Think of a set as a bag of objects. These objects (called elements) can be anything: numbers, letters, shapes, and even other sets. Now, think of boxes containing various items, such as toys, CDs, books, and photographs. A set is simply a box that contains items that usually share common characteristics but which can also include smaller boxes. The box or set may contain:

A set/box of numbers: {I, II, III} or {1, 2, 3}

A set/box of colours: {red, blue, green, yellow, violet}

A set/box of empty boxes: {{}, {}, {}}

A set/box with occupied boxes: galicianFood{starters{soup, salad, Padrón green peppers}, mainCourses{beef, fish, shellfish}, desserts{Santiago tart, Bica, Mondoñedo cake}}. A box with named smaller boxes, each containing its respective content.

Notice the use of braces to contain a set definition. You don’t need to use these conventions; it’s okay to break the rules. However, I recommend that people become familiar with them and adopt them, as well as all the other symbols and ideas associated with the discipline.

With sets, you can do simple things, such as:

Combine them (union-‘‘ ∪\cup ): put all the elements together, like a union of all Spanish football club players in the Spanish first division, a union of all types of four-legged animals, or a union of all governmental department heads.

Find common elements (intersection – ‘∩’): This method helps identify common aspects in distinct sets (or boxes), such as identifying Spanish league footballers who also play for the national Spanish team. An intersection can be used on more than two sets and contains the common values of two or more sets. For example, commonColours = {carExternalColours ∩carUpholsteryColours ∩carTrimColours}

Check what’s missing (difference-‘∖’): What appears in one set but not in another, and vice versa. For example, the difference between member states of NATO and member states of the European Union yields this set: {Austria, Ireland, Malta}.

What’s in set A and not in set B (differences in the first set-‘-‘): For example, a first set may be English words, and a second set could be French words, so the operation onlyEnglishWords = {englishWords – frenchWords} would result in a new set that only contains English words that are not found in French).

Every value in the first set is found in the second set (subset-‘‘): All the members of the architectsList set are found in the engineersList.

Assign a new and unique value to a set (assign-‘∈’): For example, add a football club to a set of football clubs. “Real Madrid” ∈ championsLeagueWinners. NB a set cannot contain duplicates.

Note that the values in sets have no inherent or guaranteed sequence.

Why is set theory important?

Set theory is the foundation of modern mathematics, providing a framework for defining and analysing relationships between elements using operations such as union, intersection, and complement.

Here’s why it’s important:

It defines how mathematics works: it provides a basic language for describing numbers, shapes, and logic , pretty much everything in mathematics.

It helps to keep things clear and precise: Using sets helps mathematicians avoid confusion and contradictions.

It is used in real-world applications: Such as computer science, databases, and logic systems, which utilise concepts from set theory.

Explore infinity: Set theory helps us talk about really big (even infinite) ideas in a structured way.

SQL: If you really know set theory and first-order logic well, you will be really well-equipped to write fabulous, fast and efficient SQL.

Summary: In short, set theory is about grouping things together and understanding how those groups relate to one another. It’s simple at first glance, yet powerful enough to describe the deeper aspects of mathematics and logic.


Discover more from GOOD STRATEGY

Subscribe to get the latest posts sent to your email.